<?php

namespace AESS\Entities;

/**
 * Description of ABase
 *
 * @author elton.schivei
 */
abstract class ABase extends \System\Data\AEntity implements IBase
{

    /**
     * [PropertyMap(Type:'\System\Types\Integer',Pk:true,PkType:'identity',Readonly:true,Column:'id')]
     * @var \System\Types\Integer
     */
    protected $_id;

    /**
     * [PropertyMap(Reference:'\AESS\Entities\Usuarios\Usuario',Nullable:false,Cascade:'update',DeleteOrphan:true,Readonly:true,Column:'id_user_creation')]
     * @var \AESS\Entities\Usuarios\IUsuario
     */
    protected $_userCreation;

    /**
     * [PropertyMap(Type:'\DateTime',Nullable:false,Readonly:true,Column:'date_creation')]
     * @var \DateTime
     */
    protected $_dateCreation;

    public function __construct(\AESS\Entities\Usuarios\IUsuario $usuario)
    {
        parent::__construct();

        $this->_id = 0;
        $this->_dateCreation = new \DateTime();
        $this->_userCreation = $usuario;
    }

    /**
     * @return type
     */
    final public function GetUserCreation()
    {
        return $this->_userCreation;
    }

    final public function GetDateCreation()
    {
        return $this->_dateCreation;
    }

    final public function GetId()
    {
        return $this->_id;
    }

}
